home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cchh01.arc / MSDEFS.H < prev    next >
Text File  |  1986-03-14  |  9KB  |  272 lines

  1. verdef    macro
  2.     db    ' Kermit-MS V2.27'
  3.     endm
  4.  
  5. BELL    EQU     07Q
  6. TAB     EQU     11Q
  7. LF      EQU     12Q
  8. FF      EQU     14Q
  9. CR      EQU     15Q
  10. XON     EQU     21Q
  11. XOFF    EQU     23Q
  12. ESC     EQU     33Q
  13. DEL     EQU     177Q
  14. BS    EQU    08H
  15. CTLZ    EQU    1AH
  16. SOH     EQU     01H             ; Start of header char.
  17.  
  18. DOS     EQU     21H
  19.  
  20. CONIN   EQU     01H
  21. CONOUT  EQU     02H
  22. RDRIN   EQU     03H
  23. PUNOUT  EQU     04H
  24. LSTOUT  EQU     05H
  25. DCONIO  EQU     06H
  26. CONINQ    EQU    07H        ; quiet console input
  27. PRSTR   EQU     09H
  28. CONSTAT EQU     0BH
  29. SELDSK    EQU    0EH        ; Select disk.  ╒21aσ
  30. OPENF   EQU     0FH
  31. CLOSF   EQU     10H
  32. SFIRST  EQU    11H
  33. SNEXT    EQU    12H
  34. DELF    EQU     13H
  35. READF   EQU     14H             ; Read from the file.
  36. WRITEF  EQU     15H
  37. MAKEF   EQU     16H
  38. GCURDSK    EQU    19H        ; Current disk.  ╒21aσ
  39. SETDMA    EQU    1AH
  40. PRSFCB    equ    29H        ; parse an fcb.
  41. DOSVER    equ    30H        ; dos version #
  42. OPEN2    EQU    3DH        ; 2.0 open
  43. CLOSE2    EQU    3EH        ; 2.0 close
  44. READF2    EQU    3FH        ; 2.0 read.
  45. LSEEK    EQU    42H        ; 2.0 lseek
  46. IOCTL    EQU    44H
  47. WRITEF2    EQU    40H        ; 2.0 write
  48. GCD    equ    47H        ; 2.0 get current directory.
  49.  
  50. PAREVN    EQU    00H        ; Even parity.            ╒10 startσ
  51. PARMRK    EQU    01H        ; Mark parity.
  52. PARNON    EQU    02H        ; No parity.    
  53. PARODD    EQU    03H        ; Odd parity.
  54. PARSPC    EQU    04H        ; Space parity.
  55.  
  56. CMKEY   EQU     01H             ; Parse a keyword.
  57. CMIFI   EQU     02H             ; Parse an input file spec (can be wild).
  58. CMOFI   EQU     03H             ; Parse an output file spec.
  59. CMCFM   EQU     04H             ; Parse a confirm.
  60. CMTXT    EQU    05H        ; Parse arbitrary text up to CR.   ╒8σ
  61.  
  62. FLOXON    EQU    1113H        ; Use XON/XOFF for flow control.
  63. FLONON    EQU    0        ; Don't do flow control.
  64. DEFHAND    EQU    XON        ; Use XON as default handshake.
  65.  
  66. DMASIZ    EQU    80H        ; Size of DMA.
  67. FCBSIZ    EQU    25H
  68.  
  69. MAXTAK    EQU    05H        ; Max number of TAKE's allowed. ╒25tσ
  70. MAXTRY  EQU    05Q        ; Default number of retries on a packet.
  71. IMXTRY  EQU    20Q        ; Default number of retries send initiate.
  72.  
  73. DEFESC  EQU     'σ'-100Q        ; The default escape character.
  74. DRPSIZ  EQU     5EH             ; Default receive packet size.
  75. DSPSIZ  EQU     50H             ; Default send packet size.
  76. DSTIME  EQU     08H             ; Default send time out interval.
  77. DRTIME  EQU     0DH             ; Default receive time out interval.
  78. DSRVTM    EQU    30        ; Default server timeout.
  79. DSPAD   EQU     00H             ; Default send padding.
  80. DRPAD   EQU     00H             ; Default receive padding.
  81. DSPADC  EQU     00H             ; Default send padding char.
  82. DRPADC  EQU     00H             ; Default receive padding char.
  83. DSEOL   EQU     CR              ; Default send EOL char.
  84. DREOL   EQU     CR              ; Default receive EOL char.
  85. DSSOH    EQU    SOH        ; Default send start-of-packet char.
  86. DRSOH    EQU    SOH        ; Default receive start-of-packet char.
  87. DSQUOT  EQU     '#'             ; Default send quote char.
  88. DRQUOT  EQU     '#'             ; Default receive quote char.
  89. DQBIN    EQU    '&'        ; Default 8-bit prefix. ╒21bσ
  90. DRPT    EQU    '~'        ; Default repeat prefix.
  91. DCHKLEN    EQU    1        ; Default checksum length.
  92. DEFPAR    EQU    PARNON        ; Default parity (none.)
  93. IBMPAR  EQU    PARMRK        ; IBM's parity (mark.)        ╒10 endσ
  94.  
  95.  
  96. bufsiz    equ    2048        ; size of serial input buffer
  97.  
  98. portmax    equ    8        ; # of serial ports
  99.  
  100. ; baud rate definitions
  101. B00455    EQU    0        ; 45.5 baud
  102. B0050    EQU    1        ; 50 baud
  103. B0075    EQU    2        ; 75 baud
  104. B0110    EQU    3        ; 110 baud
  105. B01345    EQU    4        ; 134.5 baud
  106. B0150    EQU    5        ; 150 baud
  107. B0300    EQU    6        ; 300 baud
  108. B0600    EQU    7        ; 600 baud
  109. B1200    EQU    8        ; 1200 baud
  110. B1800    EQU    9        ; 1800 baud
  111. B2000    EQU    10        ; 2000 baud
  112. B2400    EQU    11        ; 2400 baud
  113. B4800    EQU    12        ; 4800 baud
  114. B9600    EQU    13        ; 9600 baud
  115. B19200    EQU    14        ; 19200 baud
  116. B38400    EQU    15        ; 38400 baud
  117.  
  118. BAUDSIZ    EQU    16        ; Number of options for baud rate.
  119.  
  120. ; Structure definitions.
  121.  
  122. ; Modem information.
  123. mdminfo    struc
  124. mddat    dw    0        ; Default to port 1. ╒19b startσ
  125. mdstat    dw    0        ; Ditto.
  126. mdcom    dw    0        ; Here too.
  127. mden    db    0
  128. mddis    db    0
  129. mdmeoi    db    0
  130. mdintv    dw    0        ; ╒19b endσ
  131. mdminfo    ends
  132.  
  133. ; Command information.
  134. cmdinfo    struc    
  135. cmstat  db      0               ; What is presently being parsed.
  136. cmaflg  db      0               ; Non-zero when an action char has been found.
  137. cmccnt  db      0               ; Non-zero if a significant char is found.
  138. cmsflg  db      0               ; Non-zero when the last char was a space.
  139. cmostp  dw      0               ; Old stack pointer for reparse.
  140. cmrprs  dw      0               ; Address to go to on reparse.
  141. cmprmp  dw      0               ; Address of prompt.
  142. cmptab  dw      0               ; Address of present keyword table.
  143. cmhlp   dw      0               ; Address of present help.
  144. cmdbuf  db      80H DUP(0)      ; Buffer for command parsing.
  145. cmfcb   dw      0               ; Pointer to FCB.
  146. cmfcb2  dw      0               ; Pointer to position in FCB.
  147. cmcptr  dw      0               ; Pointer for next char input.
  148. cmdptr  dw      0               ; Pointer into the command buffer.
  149. cmsiz    dw    0        ; Size info of user input.
  150. cmkptr  dw      0               ; Pointer to keyword.
  151. cmsptr  dw      0               ; Place to save a pointer.
  152. cmchr    db    0        ; Save char when checking ambiguity.
  153. cmrflg    db    0        ; Assume parsing filename for send. ╒21aσ
  154. cmcr    db    0        ; Say whether bare CR is allowed.
  155. cmdinfo    ends
  156.  
  157. ; Flags information.
  158. flginfo    struc
  159. belflg    db    1        ; Use bell  ╒17a -- DTσ
  160. comflg    db    1        ; Use COM1 by default. ╒19bσ
  161. abfflg    db    1        ; Discard incoming file if abort. ╒20dσ
  162. debug    db    0        ; Debugging mode (default off).
  163. flwflg  db      1               ; File warning flag (default on). ╒19cσ
  164. ibmflg  db      0               ; IBM flag (default off).
  165. extflg  db      0               ; Exit flag (default off).
  166. vtflg    db    1        ; H-19 emulation.
  167. droflg    db    0        ; Override default disk drive. ╒21aσ
  168. nmoflg    db    0        ; Override name from the F packet. ╒21aσ
  169. wldflg    db    0        ; Assume no "*" in fn.         ╒7σ
  170. cxzflg    db    0        ; ^X/^Z to interrupt file x-fer. ╒20bσ
  171. xflg    db    0        ; Seen "X" packet. ╒21cσ
  172. filflg  db      0               ; Non-zero when nothing in DMA buffer.
  173. eoflag  db      0               ; EOF flag; non-zero on EOF.
  174. getflg    db    0        ; Assume normal RECEIVE (not GET). ╒21aσ
  175. capflg    db    0        ; On if capturing data. ╒25σ
  176. takflg    db    0        ; On if echo commands of TAKE file.
  177. timflg    db    0        ; Say if are timing out or not.
  178. destflg    db    1        ; Incoming files destination: disk or printer.
  179. eofcz    db    0        ; ^Z signals eof if non-zero.
  180. remflg    db    0        ; non-zero if in remote mode.
  181. flginfo    ends
  182.  
  183. ; Transmission parameters
  184. trinfo    struc
  185. maxdat    db    0        ; Max packet size for send.
  186. chklen    db    1        ; Number of characters in checksum.
  187. seol    db    dseol        ; Send EOL char.
  188. reol    db    dreol        ; Receive EOL char.
  189. ssoh    db    dssoh        ; Send start-of-packet character.
  190. rsoh    db    drsoh        ; Receive start-of-packet character.
  191. squote  db    dsquot        ; Send quote character.
  192. rquote    db    drquot        ; Receive quote character.
  193. spsiz    db    dspsiz        ; Send packet size.
  194. rpsiz    db    drpsiz        ; Receive packet size.
  195. stime    db    dstime        ; Send timeout. (Don't timeout).
  196. rtime    db    drtime        ; Receive timeout.
  197. spad    db    dspad        ; Send padding.
  198. rpad    db    drpad        ; Receive padding.
  199. spadch    db    dspadc        ; Send padding char.
  200. rpadch    db    drpadc        ; Receive padding char.
  201. ebquot    db    'Y'        ; Send 8-bit quote character.
  202. escchr    db    defesc        ; Escape character.
  203. trinfo    ends
  204.  
  205. pktinfo    struc
  206. pktnum  dw      0               ; Packet number.
  207. numpkt  dw      0               ; Total number of packets sent.
  208. numrtr  dw      0               ; Total number of retries.
  209. numtry  db      0               ; Number of tries on this packet.
  210. oldtry  db      0               ; Number of tries on previous packet.
  211. state   db      0               ; Present state of the automaton.
  212. argblk  dw      0               ; For subroutine arguments.
  213. argbk1  dw      0
  214. argbk2  dw      0
  215. argbk3  dw      0
  216. pktinfo    ends
  217.  
  218. takinfo    struc
  219. takfcb    db    fcbsiz dup(0)
  220. takbuf    db    dmasiz dup(0)
  221. takptr    dw    0
  222. takchl    db    0
  223. takcnt    dw    0,0
  224. takinfo ends
  225.  
  226. ; Port Information.
  227. prtinfo    struc
  228. baud    dw    0        ; Default baud rate.
  229. ecoflg  db      0               ; Local echo flag (default off).
  230. parflg  db    0        ; Parity flag (default none.)  ╒10σ
  231. floflg    db    0        ; If need flow control during file x-fer.
  232. hndflg    db    0        ; If need handshake during file x-fer.
  233. hands    db    0        ; Default handshake.
  234. flowc    dw    0        ; Do flow control with XON/XOFF.
  235. prtinfo    ends
  236.  
  237. mkeyw    macro    key,val
  238.     local    junk,oldval
  239. oldval    equ    $
  240.     db    junk,key,'$'
  241. junk    equ    $-oldval-2
  242.     dw    val
  243.     endm
  244.  
  245.  
  246. ; definitions for terminal handler:
  247.  
  248. termarg    struc
  249. flgs    db    ?        ; flags
  250. prt    db    ?        ; port to use (0,1)
  251. cols    db    ?        ; # columns on screen
  252. rows    db    ?        ; # rows on screen
  253. captr    dw    ?        ; routine to call with captured data
  254. belld    dw    ?        ; bell divisor
  255. klen    dw    ?        ; length of key redefinition table
  256. ktab    dw    ?        ; address of key redefinition table
  257. krpl    dw    ?        ; address of key replacement table
  258. escc    db    ?        ; escape character
  259. baudb    db    ?        ; baud rate bits.
  260. parity    db    ?        ; parity
  261. termarg    ends
  262.  
  263. ; bits for flag byte
  264. scrsam    equ    80h            ; on if shouldn't redraw screen
  265. capt    equ    40h            ; capture output
  266. emheath    equ    20h            ; emulate heath
  267. havtt    equ    10h            ; have translate table
  268. trnctl    equ    08h            ; translate control chars
  269. modoff    equ    04h            ; mode line off
  270. lclecho    equ    01h            ; local echo
  271.  
  272.